<?php
header("content-type:text/html:charset=sutf-8");
require_once "db_conn.php";
$conn;
$username = $_POST['username'];
$sex = $_POST['sex'];
$message = $_POST['message'];
$imgurl = $_POST['imgurl'];

$sql ="
INSERT INTO  `bbs`.`t_message` (
`id` ,
`username` ,
`sex` ,
`content` ,
`avater` ,
`time-at`
)
VALUES (
NULL ,  '$username',  '$sex',  '$message',  '$imgurl',  ''
);

";
$result = $conn->query($sql);
if($result===false){
    echo"0";
}
header("location:index.php");//跳转语句
?>
